<?php
/**
 * Created by PhpStorm.
 * User: zhang
 * Date: 2018/1/29
 * Time: 16:29
 */

/* 转换变量 $post1、$post2 编码为内部（internal）编码 */
$post1 = "hello";
$post2 = "中国";
echo $post2 . PHP_EOL;
$interenc = mb_internal_encoding();
echo $interenc.PHP_EOL;
$inputenc = mb_convert_variables( $interenc,
	"ASCII,UTF-8,SJIS-win",
	$post1,
	$post2 );
if ( $inputenc ) {
	echo $post1 . PHP_EOL;
	echo $post2 . PHP_EOL;
}
